
#include <Final.h>

Final::Final() : Store(), vStates(0)
{
}

Final::Final(States* states) : Store(), vStates(states)
{
}

Final::Final(States* states, TokensIter ti) : Store(ti), vStates(0)
{
}

Final::Final(States* states, char* input) : Store(input), vStates(0)
{
}

void Final::add(Element elem)
{
	if ( vStates->ifExists(elem) )
		Store::add(elem);
	else
		cerr << "Warning : "
			<< "State '" << elem
			<< "' not in the set of valid states" << endl;
}	

void Final::set(States* states)
{
	vStates = states;
}

